<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>用户管理</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/front/css/bootstrap.min.css"/>

</head>
<body>

<%@include file="/inc/menu.jsp"%>

<div class="container-fluid">
    <div class="main-content">
        <div class="row">
            <div class="col-sm-12">
                <ul class="nav nav-tabs nav-3rd">
                    <li><span>用户管理</span></li>
                    <li class="active">用户列表</li>
                    <li><a href="${pageContext.request.contextPath}/admin/user/add">新增用户</a></li>
                </ul>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <a class="btn btn-primary" href="${pageContext.request.contextPath}/admin/user/add">新增</a>
                <a class="btn btn-primary" href="${pageContext.request.contextPath}/admin/user/delete">删除</a>
            </div>
            <%--<div class="col-sm-5 col-sm-offset-1">--%>
            <%--<form id="searchForm" method="post" action="list" name="user"--%>
            <%--htmlEscape="false">--%>
            <%--#set($pageNo = $pager.number + 1)--%>
            <%--#set($size = $pager.size)--%>
            <%--<input id="pageNo" name="pageNo" type="hidden" value="$pageNo"/>--%>
            <%--<input id="pageSize" name="pageSize" type="hidden" value="$size"/>--%>

            <%--<div class="input-group">--%>
            <%--<span class="input-group-addon">用户名：</span>--%>
            <%--<input name="title" type="text" class="form-control" placeholder="请输入你要查询的内容"--%>
            <%--onkeypress="var e=window.event||this;var c=e.keyCode||e.which;if(c==13)page(1,$pager.size);"--%>
            <%--value="$!search">--%>
            <%--<span class="input-group-btn">--%>
            <%--<button class="btn btn-default" type="button" onclick="page(1,$pager.size)">查询</button>--%>
            <%--</span>--%>
            <%--</div>--%>
            <%--</form>--%>
            <%--</div>--%>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div>
                    <table class="table table-bordered table-striped table-condensed table-hover">
                        <thead>
                        <tr>
                            <th>
                                <button id="check-all" class="btn btn-sm btn-default">全选</button>
                                <button id="check-cancel" class="btn btn-sm btn-default hidden">取消</button>
                            </th>
                            <th>用户名称</th>
                            <th>添加时间</th>
                            <th>最近更新时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${userList}" var="user">
                            <tr>
                                <td><input id="" class="checkable" name="user-id" type="checkbox" value=""></td>
                                <td>${user.username}</td>
                                <td>${user.createDate}</td>
                                <td>${user.updateDate}</td>
                                <td>
                                    <a class="btn btn-default" href="${pageContext.request.contextPath}/admin/user/edit/${user.id}"
                                            >修改</a>
                                    <a class="btn btn-default" href="#" onclick="if (confirm('确认要删除该用户吗？此操作将不可恢复！'))
                                            location = '${pageContext.request.contextPath}/admin/user/delete/${user.id}';
                                            return false;">删除</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <div class="row">
                        <div class="col-sm-12">
                            分页
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
</body>
</html>


